package top.jsjkxyjs.blackbox.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import top.jsjkxyjs.blackbox.entity.Address;
import top.jsjkxyjs.blackbox.mapper.AddressMapper;
import top.jsjkxyjs.blackbox.service.AddressService;

import java.util.List;

@Service
public class AddressServiceImpl implements AddressService {
	@Autowired
	AddressMapper addressMapper;

	@Override
	public List<Address> findByParent(int province) {
		List<Address> data = addressMapper.findByParent(province);
		return data;
	}

	@Override
	public int findNameByCode(int code) {
		int data = addressMapper.findNameByCode(code);
		return data;
	}
}
